package com.lujieni.async.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

/**
 * @author
 * @Title: B
 * @Description:
 * @date 2022/2/23 2:15 下午
 *
 *  有循环依赖的2个类,@Async标签在谁身上,谁就不能首先被注册到容器中否则会报错
 *
 */
@Component
public class B {

    @Autowired
    private C c;

    //@Async
    public void testB() {
        c.testA();
    }

}
